<template>
  <el-menu
    id="menu"
    :default-active="activeIndex"
    class="el-menu-demo"
    mode="horizontal"
    @select="handleSelect"
    background-color="unset"
    style="padding-left:50px;"
    
  >
    <el-menu-item index="1">推荐</el-menu-item>
    <el-menu-item index="2">奥运</el-menu-item>
    <el-menu-item index="3">娱乐</el-menu-item>
    <el-menu-item index="4">音乐</el-menu-item>
    <el-submenu index="2">
      <template slot="title">其它</template>
      <el-menu-item index="2-1">其它分类1</el-menu-item>
      <el-menu-item index="2-2">其它分类2</el-menu-item>
      <el-menu-item index="2-3">其它分类3</el-menu-item>
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1",
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
  },
};
</script>

<style>
#menu > * {
  width: 230px;
}
</style>